<div class="row text-center">
  <div class="col-md-4">
    <div class="btn-group">
      <div
        class="btn btn-primary"
        mwlCalendarPreviousView
        [view]="view"
        [(viewDate)]="viewDate"
        [excludeDays]="excludeDays"
      >
        Previous
      </div>
      <div
        class="btn btn-outline-secondary"
        mwlCalendarToday
        [(viewDate)]="viewDate"
      >
        Today
      </div>
      <div
        class="btn btn-primary"
        mwlCalendarNextView
        [view]="view"
        [(viewDate)]="viewDate"
        [excludeDays]="excludeDays"
      >
        Next
      </div>
    </div>
  </div>
  <div class="col-md-4">
    <h3>
      {{ viewDate | calendarDate:(view +
      'ViewTitle'):'en':weekStartsOn:excludeDays }}
    </h3>
  </div>
  <div class="col-md-4">
    <div class="btn-group">
      <div
        class="btn btn-primary"
        (click)="view = CalendarView.Month"
        [class.active]="view === 'month'"
      >
        Month
      </div>
      <div
        class="btn btn-primary"
        (click)="view = CalendarView.Week"
        [class.active]="view === 'week'"
      >
        Week
      </div>
      <div
        class="btn btn-primary"
        (click)="view = CalendarView.Day"
        [class.active]="view === 'day'"
      >
        Day
      </div>
    </div>
  </div>
</div>
<br />

<div>
  @switch (view) { @case ('month') {
  <mwl-calendar-month-view
    [viewDate]="viewDate"
    [events]="events"
    [excludeDays]="excludeDays"
  />
  } @case ('week') {
  <mwl-calendar-week-view
    [excludeDays]="excludeDays"
    [viewDate]="viewDate"
    [events]="events"
  />
  } @case ('day') {
  <mwl-calendar-day-view [viewDate]="viewDate" [events]="events" />
  } }
</div>
